<?php 
/**
*  
*/
class Cvideo extends CI_Controller
{
	
	public function __construct() {
		# code...
		parent::__construct();
		$this->load->helper('url');
	}
	public function index() {

	}
	public function playVideo($filename,$id) {
		$id=$this->decode_id($id);
		$data['url_path']=$this->config->item('url_path');
		$data['temp_path']=$this->config->item('temp_path');
        $data['upload_path']=$this->config->item('upload_path');
		$this->load->Model('Mmusic');
        $this->load->Model('Mgenre');
        $this->load->Model('Malbum');
        $this->load->Model('Mvideo');
        $data['data_listAlbumHot']=$this->Malbum->getAlbumHot(9);
		$data['data_listSong_hot']=$this->Mmusic->getTopSong(10);
		$data['data_listGenre']=$this->Mgenre->getAllGenre();
		$data['data_listSong_hot']=parent::getBase64Code($data['data_listSong_hot'],'idSong');
		$data['data_listSong_hot']=parent::getBase64Code($data['data_listSong_hot'],'idArtist');
		$data['data_listSong_hot']=parent::convertStringUrl($data['data_listSong_hot'],'strFileName','title');
		$data['data_listSong_hot']=parent::convertStringUrl($data['data_listSong_hot'],'strArtist','titleArtist');
		$data['data_bxh_video']=$this->Mvideo->getTopVideo(10);
		$data['data_bxh_video']=parent::getBase64Code($data['data_bxh_video'],'idVideo');
		$data['data_bxh_video']=parent::getBase64Code($data['data_bxh_video'],'idArtist');
		$data['data_bxh_video']=parent::convertStringUrl($data['data_bxh_video'],'strFileName','titleVideo');
		$data['data_bxh_video']=parent::convertStringUrl($data['data_bxh_video'],'strArtist','titleArtist');
		$data['data_bxh_video']=parent::convertStringUrl($data['data_bxh_video'],'strExtraArtist','titleExtraArtist');
		$data['data_listAlbumHot']=parent::getBase64Code($data['data_listAlbumHot'],'idAlbum');
		$data['data_listAlbumHot']=parent::getBase64Code($data['data_listAlbumHot'],'idArtist');
		$data['data_listAlbumHot']=parent::convertStringUrl($data['data_listAlbumHot'],'strNameAlbum','titleAlbum');
		$data['data_listAlbumHot']=parent::convertStringUrl($data['data_listAlbumHot'],'strArtist','titleArtist');
		$data['data_listGenre']=parent::getBase64Code($data['data_listGenre'],'idGenre');
		$data['info_elem']=$this->Mvideo->getVideo($id);
		$data['info_elem']=parent::getBase64Code($data['info_elem'],'idArtist');
		$data['info_elem']=parent::getBase64Code($data['info_elem'],'idTheme');
		$data['info_elem']=parent::getBase64Code($data['info_elem'],'idGenre');
		$data['info_elem']=parent::getBase64Code($data['info_elem'],'idAlbum');
		$data['info_elem']=parent::convertStringUrl($data['info_elem'],'strNameAlbum','titleAlbum');
		$data['info_elem']=parent::convertStringUrl($data['info_elem'],'strArtist','titleArtist');
		$data['info_elem']=parent::convertStringUrl($data['info_elem'],'strGenre','titleGenre');
		$data['info_elem']=parent::convertStringUrl($data['info_elem'],'strTheme','titleTheme');
		$data['type_elem']='video';
		$this->load->view('user/playSong',$data);
	}
}

 ?>